Organization

Value Boxes

Primary

25

Commits

3856

People

60

Issues

DEFINE

Companies

~23

Value Boxes

9

307

15

3

15

3rd Party Outputs

Repositories

People

Mission

Column

Mission statement

The objective of the Github organisation github.com/openpharm (openpharma) is to provide a neutral home for open source software that is not tied to one company or institution. This Github organization is managed under the following principals:

Hosting repositories in a neutral space:

  • openpharma allows repositories housed within it to set their own governance model
  • openpharma is open to any project related to the Pharma industry
  • openpharma makes no assumptions on what packages are part of an ‘ideal’ workflow
  • a preference is always placed on opensource from day 1, but openpharma will also host packages in private repos on request
  • [at launch, Roche has admin status for the organization] openpharma will work towards a governance model that is inclusive and builds trust in those contributing to packages (e.g. use a more formalized consortia like the pharmaverse to provide governance of the Github organization)
  • openpharma is open to collaborating with relevant organizations like PHUSE, R Consortium, PSI and the pharmaverse – but openpharma will remain an open host to share projects and provide a platform for repositories looking for a neutral host.
  • openpharma will not hold any IP or copyright of associated projects, it will not be a platform for discussion or host initiatives, and it will not release opinions or standards on which repositories form part of an ideal workflow.

Promoting collaboration on projects:

  • openpharma will aim to build an inclusive list of collaborative projects hosted on github.com that goes beyond those physically hosted in github.com/openpharma.
  • openpharma will surface these projects to encourage collaboration (e.g. provide a front end like https://insights.lfx.linuxfoundation.org/projects)
---
title: "openpharma"
output: 
  flexdashboard::flex_dashboard:
    theme: 
      version: 4
      bootswatch: minty
    orientation: rows
    social: menu
    source_code: embed
    navbar:
      - { title: "Github", href: "https://github.com/openpharma/", align: right, icon: github}
---

```{r, include=FALSE}
library(flexdashboard)
library(ggplot2)

library(dplyr)
library(lubridate)
library(glue)


thematic::thematic_rmd(
  font = "auto",
  # To get the dark bg on the geom_raster()
  sequential = thematic::sequential_gradient(fg_low = FALSE, fg_weight = 0, bg_weight = 1)
)
theme_set(theme_bw(base_size = 20))
```

```{r getdata}
library(pins)
  pins::board_register_github(
    repo = "openpharma/openpharma_log", branch = "main"
    )
  
  commits <- pin_get("all-commits", board = "github")
  contributors <- pin_get("all-contributors", board = "github")
  repos <- pin_get("all-repos", board = "github", cache = FALSE)
```

```{r prepdata-commits}
commits_repo_ever <- commits %>%
  group_by(
    full_name
    ) %>%
  summarise(
    authors = n_distinct(author),
    commits = n()
  )

commits_repo_monthly <- commits %>%
  group_by(
    full_name,
    month = floor_date(date, "month")
    ) %>%
  summarise(
    authors = n_distinct(author),
    commits = n()
  )

commits_org_ever <- commits %>%
  group_by(
    org = dirname(full_name)
    ) %>%
  summarise(
    authors = n_distinct(author),
    commits = n()
  )

commits_repo_monthly <- commits %>%
  group_by(
    org = dirname(full_name),
    month = floor_date(date, "month")
    ) %>%
  summarise(
    authors = n_distinct(author),
    commits = n()
  )
```

Organization
===================================== 

Value Boxes {data-width=200}
-------------------------------------

### Primary

```{r}
valueBox(n_distinct(repos$repo), caption = "Total repos", icon = "fa-github")
```

### Commits

```{r}
valueBox(nrow(commits), caption = "Commits", color = "success", icon = "fa-code-branch")
```

### People

```{r}
valueBox(
  n_distinct(contributors$author), 
  caption = "People", color = "success", icon = "fa-users")
```

### Issues

```{r}
valueBox(
  "DEFINE", 
  caption = "Open Issues", color = "success", icon = "fa-question")
```

### Companies

```{r}
valueBox(
  glue("~{n_distinct(contributors$company)}"), 
  caption = "Unique employers", color = "success", icon = "fa-building")
```

Value Boxes {data-width=200}
-------------------------------------


### 

```{r}
lookback <- 30*3
lookback_char <- "3 months"

valueBox(
  commits %>%
    filter(date > Sys.Date() - lookback) %>%
    pull(full_name) %>% n_distinct(),
  caption = glue("Repos active | Last {lookback_char}"), 
  color = "info", icon = "fa-chart-line"
  )
```

### 

```{r}
valueBox(
  commits %>%
    filter(date > Sys.Date() - lookback) %>%
    nrow(),
  caption = glue("Commits | Last {lookback_char}"),
  color = "info", icon = "glyphicon-time")
```

### 

```{r}
valueBox(
  commits %>%
    filter(date > Sys.Date() - lookback) %>%
    pull(author) %>% n_distinct(),
  caption = glue("People active | Last {lookback_char}"), 
  color = "info", icon = "glyphicon-time")
```

### 

```{r}
valueBox(
  repos %>%
    filter(language %in% c("Python", "Jupyter Notebook")) %>%
    nrow(), 
  caption = "Estimated Python", color = "info",
  icon = "fab fa-python"
)
```

### 

```{r}
# TODO: why is there a linked value here?
valueBox(
  repos %>%
    filter(language == "R") %>%
    nrow(), 
  caption = "Estimated R", color = "info",
  icon = "fab fa-r-project"
)
```

    
3rd Party Outputs {.tabset}
-------------------------------------

### Repositories
    
```{r}
DT::datatable(
    repos %>%
        mutate(
          `Last updated` = as.Date(updated_at)
          ) %>%
        arrange(desc(`Last updated`)) %>%
        select(
            Repo = full_name,
            Description = description,
            `Est. language` = language,
            `Last updated`
        ), 
    rownames = FALSE,
    fillContainer = TRUE)
```

### People
    
```{r}

DT::datatable(
  contributors %>%
    left_join(
      commits %>%
        group_by(author) %>%
        summarise(
          contributed_to = n_distinct(full_name),
          commits = n()
        ),
      by = "author"
    ) %>%
    mutate(
      last_active = Sys.Date() - last_active,
      contributor = glue(
        '<img src="{avatar}" alt="" height="30" width = "30"> {name} ({author})'
        ),
      Blog = case_when(
        blog == "" ~ "",
        TRUE ~ as.character(glue('<a href="{blog}">link</a>'))
        ),
      Name = glue("{name} ({author})")
      ) %>%
    arrange(last_active, desc(contributed_to), desc(commits)) %>%
    select(
      `Name (GH handle)` = contributor,
      Repos = contributed_to,
      `Commits` = commits,
      `Days since active` = last_active,
      Company = company,
      Location = location,
      Blog
      ) , 
    escape = FALSE,
    rownames = FALSE,
    fillContainer = TRUE)
```




Mission
=====================================     
   
Column 
-------------------------------------

### Mission statement

The objective of the Github [organisation github.com/openpharm](https://github.com/openpharma) (openpharma) is to provide a neutral home for open source software that is not tied to one company or institution. This Github organization is managed under the following principals:

Hosting repositories in a neutral space:

* openpharma allows repositories housed within it to set their own governance model
* openpharma is open to any project related to the Pharma industry
* openpharma makes no assumptions on what packages are part of an ‘ideal’ workflow
* a preference is always placed on opensource from day 1, but openpharma will also host packages in private repos on request
* [at launch, Roche has admin status for the organization] openpharma will work towards a governance model that is inclusive and builds trust in those contributing to packages (e.g. use a more formalized consortia like the pharmaverse to provide governance of the Github organization)
* openpharma is open to collaborating with relevant organizations like PHUSE, R Consortium, PSI and the pharmaverse – but  openpharma will remain an open host to share projects and provide a platform for repositories looking for a neutral host. 
* openpharma will not hold any IP or copyright of associated projects, it will not be a platform for discussion or host initiatives, and it will not release opinions or standards on which repositories form part of an ideal workflow.

Promoting collaboration on projects:

* openpharma will aim to build an inclusive list of collaborative projects hosted on github.com that goes beyond those physically hosted in github.com/openpharma.
* openpharma will surface these projects to encourage collaboration (e.g. provide a front end like https://insights.lfx.linuxfoundation.org/projects)


### Links

- R/Pharma conference: [rinpharma.com](https://rinpharma.com/)
- R Consortium: [r-consortium.org](https://www.r-consortium.org/)
- Get your project funded!: [ISC](https://www.r-consortium.org/projects/call-for-proposals)